<%@ taglib prefix="stripes" uri="http://stripes.sourceforge.net/stripes.tld" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="/support/taglibs.jsp" %>
<stripes:layout-render name="/support/layout/standard.jsp" title="Reports" page="reports">
<stripes:layout-component name="contents">

   <jsp:useBean id="report" scope="page" class="edu.hawaii.myisern.model.Report"/>
   
<body>
  <strong>Researcher Errors</strong>:
  
  <br /><br />
  
  <table class="list">
    <th>Researcher</th>
    <th>Organization</th>
    <th></th>
    <c:forEach items="${report.resesarchersWithoutOrgs}" var="errRecord" varStatus="rowstat"> 
      <tr class="${rowstat.count mod 2 == 0 ? "even" : "odd"}">
        <td>${errRecord.name}</td>
        <td>${errRecord.organization}</td>
        <td><stripes:link href="ResearcherForm.action" event="preEdit">
              Edit
              <stripes:param name="id" value="${errRecord.name}"/>
            </stripes:link> 
        </td>
      </tr>
    </c:forEach>
  </table>
    
  <br /><br />
  
  <strong>Organization Errors</strong>:
  
  <br /><br />
  
  <table class="list">
    <th>Organization</th>
    <th>Contact</th>
    <th></th>
    <c:forEach items="${report.orgsWithoutResesarchers}" var="errRecord" varStatus="rowstat"> 
      <tr class="${rowstat.count mod 2 == 0 ? "even" : "odd"}">
        <td>${errRecord.name}</td>
        <td>${errRecord.contact}</td>
        <td><stripes:link href="OrganizationForm.action" event="preEdit">
              Edit
              <stripes:param name="id" value="${errRecord.name}"/>
            </stripes:link> 
        </td>
      </tr>
    </c:forEach>
  </table>
  
  <br /><br />
  
  <strong>Collaboration Errors</strong>:
  
  <br /><br />
  
  <table class="list">
    <th>Collaboration Name</th>
    <th>Organization</th>
    <th></th>
    <c:forEach items="${report.collabsWithoutOrgs}" var="errRecord" varStatus="rowstat"> 
      <tr class="${rowstat.count mod 2 == 0 ? "even" : "odd"}">
        <td>${errRecord.name}</td>
        <td>${errRecord.collaboratingOrganizations.collaboratingOrganization}</td>
        <td><stripes:link href="CollaborationForm.action" event="preEdit">
              Edit
              <stripes:param name="id" value="${errRecord.name}"/>
            </stripes:link> 
        </td>
      </tr>
    </c:forEach>
  </table>
  
  <br /><br />
  
  <table class="list">
    <th>Collaboration Name</th>
    <th>Outcomes</th>
    <th></th>
    <c:forEach items="${report.collabsWithoutOrgs}" var="errRecord" varStatus="rowstat"> 
      <tr class="${rowstat.count mod 2 == 0 ? "even" : "odd"}">
        <td>${errRecord.name}</td>
        <td>${errRecord.outcomeTypes.outcomeType}</td>
        <td><stripes:link href="CollaborationForm.action" event="preEdit">
              Edit
              <stripes:param name="id" value="${errRecord.name}"/>
            </stripes:link> 
        </td>
      </tr>
    </c:forEach>
  </table>
  
  <br /><br />
    
</body>
   
</stripes:layout-component>
</stripes:layout-render>
